const btn = document.getElementsByClassName("btn")[0]
const container = document.getElementsByClassName("container")[0]

btn.addEventListener("click",fun)

function fun(e){
    const bt = document.createElement("div")
    container.appendChild(bt)
    bt.className = "a"
    bt.style.top = (e.clientY-btn.style.top-5)+"px"
    bt.style.left = (e.clientX-btn.style.left-5)+"px"
    console.log(bt.style.top)
    setTimeout(function(){
        bt.parentElement.removeChild(bt)
    },400)
}
